<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>draggable</title>
  <script src="./draggable.bundle.js"></script>
  <style>
    .item {
      height: 100%;
    }

    .dropzone {
      outline: solid 1px;
      height: 50px;
    }

    .dropzoneddd {
      outline: solid 1px;
      height: 50px;
    }

    .draggable-dropzone--occupied {
      background: lightgreen;
    }

    .no-select {
      -webkit-touch-callout: none;
      /* iOS Safari */
      -webkit-user-select: none;
      /* Chrome/Safari/Opera */
      -khtml-user-select: none;
      /* Konqueror */
      -moz-user-select: none;
      /* Firefox */
      -ms-user-select: none;
      /* Internet Explorer/Edge */
      user-select: none;
      /* Non-prefixed version, currently not supported by any browser */
    }
  </style>
</head>

<body class="no-select">
  <!-- <div class="container">
    <div class="dropzone draggable-dropzone--occupied">
      <div class="item">A</div>
    </div>
    <div class="dropzone draggable-dropzone--occupied">
      <div class="item">B</div>
    </div>
    <div class="dropzone draggable-dropzone--occupied">
      <div class="item">C</div>
    </div>
  </div> -->
  <div class="container">
    <div class="draggable-droppable draggable-dropzone--occupied">
      <div class="draggable-source">A</div>
    </div>
    <div class="draggable-droppable draggable-dropzone--occupied">
      <div class="draggable-source">B</div>
    </div>
    <div class="draggable-droppable draggable-dropzone--occupied">
      <div class="draggable-source">C</div>
    </div>
  </div>

  <div class="container">
    <div class="dropzoneddd draggable-droppable"></div>
  </div>

  <script>
    const droppable = new Draggable.Droppable(document.querySelectorAll('.container'),
      // {
      //   draggable: '.item',
      //   dropzone: '.dropzone'
      // }
    );

    droppable.on('droppable:dropped', (evt, evt2) => {
      console.log(evt, evt2)
      console.log('droppable:dropped')
      evt.cancel()
    });
    droppable.on('droppable:returned', () => console.log('droppable:returned'));
  </script>

</body>

</html>